#!/usr/bin/python
# -*- coding: UTF-8 -*-

import MySQLdb

def insert_project_info(tid, key_name, key_val, val_from):
    db = MySQLdb.connect("localhost","root","root","unispider")

    cursor = db.cursor()

    cursor.execute("insert tbl_oss_sp_project_inf(tid, key_name, key_val, val_from) values(%s,%s,%s,%s)", (tid, key_name, key_val, val_from))

    db.commit()

    data = cursor.fetchone()

    print "reply:",data

    db.close()
